//	--------------------------------------------------------------------
//	Copyright(C) 2006,2007 Zhao Yukun. All rights reserved.
//	This file is a part of the Xeres system.
//	Xeres 2007
//	Contact : xeres.engine@gmail.com
//	$(reservedInfo)
//	$(reservedDeclaration)
//	--------------------------------------------------------------------
///	@file	<ext_style.cpp>
///	@path	~/src/gui/style/
///	@date	2008/11/16
///	@desc	.

#define _FULLAPI
#include "config/config.h"

#include "gui/style/ext_style.h"
#include "gui/image/IBitmap.h"

namespace xeres {

	// GuiStyle
	GuiStyle::GuiStyle( void )
		: m_guiBackgroundColor( 0x0 )
		, m_guiBorderColor( 0x0 )
	{
	}
	// GuiStyle
	GuiStyle::GuiStyle( const GuiStyle& rhs )
		: m_guiBackgroundColor( rhs.m_guiBackgroundColor )
		, m_guiBorderColor( rhs.m_guiBorderColor )
	{
	}

	IMPL_IOBJECT_CLASS_DYNAMIC( CGuiStyle );

	// CGuiStyle
	CGuiStyle::CGuiStyle( void )
	{
	}
	// CGuiStyle
	CGuiStyle::CGuiStyle( const CGuiStyle& rhs )
		: CTextStyle( rhs )
	{
		*((ImageStyle*)this) = rhs;
		*((GuiStyle*)this) = rhs;
	}
	// ~CGuiStyle
	CGuiStyle::~CGuiStyle( void )
	{

	}
	// QueryStyle
	RefWeak<IVar> CGuiStyle::QueryStyle( const WString& name )
	{
		return NULL;
	}
	// SetStyle
	bool CGuiStyle::SetStyle( const WString& name , const WString& value )
	{
		return false;
	}
	// AccessHover
	Ref<CGuiStyle> CGuiStyle::AccessHover( void )
	{
		if( m_hover.IsNull() )
			m_hover = new CGuiStyle( *this );
		return m_hover;
	}
	// AccessFocus
	Ref<CGuiStyle> CGuiStyle::AccessFocus( void )
	{
		if( m_focus.IsNull() )
			m_focus = new CGuiStyle( *this );
		return m_focus;
	}
	// AccessClicked
	Ref<CGuiStyle> CGuiStyle::AccessClicked( void )
	{
		if( m_clicked.IsNull() )
			m_clicked = new CGuiStyle( *this );
		return m_clicked;
	}
	// AccessDisable
	Ref<CGuiStyle> CGuiStyle::AccessDisable( void )
	{
		if( m_disable.IsNull() )
			m_disable = new CGuiStyle( *this );
		return m_disable;
	}
	// AccessEnable
	Ref<CGuiStyle> CGuiStyle::AccessEnable( void )
	{
		return this;
	}

} // namespace xeres
